DB2 has a utility called “reorg” that is used to maintain DB2® tables and indexes. Reorganization (i.e. “reorg”) of data is a normal maintenance task performed by database administrators to keep the DB2® data (objects) organized. Reorgs are used to defragment data, reclaim free space, sort/order the data according to an index and eliminate overflow rows in order to improve data access performance. Although DB2® UDB® has automatic maintenance that performs reorgs (AUTO_REORG), the table reorgs are offline reorgs.
Online table reorgs run asynchronously, once the command is entered control is returned to the caller and the reorg command continues to run in the background. No notification is returned back to the caller that the online reorg completed successfully or not. This makes online reorgs difficult to manage at best.